/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exatrez.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author skynsae
 */
@Entity
@Table(name = "task_file")
@NamedQueries({
    @NamedQuery(name = "TaskFile.findAll", query = "SELECT t FROM TaskFile t")})
public class TaskFile implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "task_file_id")
    private Integer taskFileId;
    @Basic(optional = false)
    @Column(name = "user_id")
    private String userId;
    @Column(name = "document_path")
    private String documentPath;
    @Column(name = "content_type")
    private String contentType;
    @Column(name = "title")
    private String title;
    @Embedded
    private InfoAudit infoAudit;

    public TaskFile() {
    }

    public TaskFile(Integer taskFileId) {
        this.taskFileId = taskFileId;
    }

    public Integer getTaskFileId() {
        return taskFileId;
    }

    public void setTaskFileId(Integer taskFileId) {
        this.taskFileId = taskFileId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getDocumentPath() {
        return documentPath;
    }

    public void setDocumentPath(String documentPath) {
        this.documentPath = documentPath;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }
  
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (taskFileId != null ? taskFileId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TaskFile)) {
            return false;
        }
        TaskFile other = (TaskFile) object;
        if ((this.taskFileId == null && other.taskFileId != null) || (this.taskFileId != null && !this.taskFileId.equals(other.taskFileId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "exatrez.model.TaskFile[ taskFileId=" + taskFileId + " ]";
    }
}
